<%@ page contentType="text/html;charset=utf-8"%>
<%@ page import="com.jfree.servlet.CakeServlet"%>
<%@ page import="com.jfree.model.SourceModel"%>
<%@ page import="java.io.PrintWriter"%>

<HTML>
 <HEAD>
  <TITLE>PieChart</TITLE>
 </HEAD>
 <%
  SourceModel model = new SourceModel();
  String info = model.getSource("b");
  String filename = CakeServlet.generatePieChart(info, "統計信息饼图",
    session, new PrintWriter(out));

  String graphURL = request.getContextPath()
    + "/DisplayChart?filename=" + filename;
 %>
 <BODY>
  <img src="<%=graphURL%>" width=500 height=300 border=0
   usemap="#<%= filename %>">
 </BODY>
</HTML>